<!-- #cartoon:tab3  Author:liuricheng   Time:2013-08-29 -->


<script>
	$(document).ready(function(){
		var button4 = $('#button4'),interval;
		
		new AjaxUpload(button4, {
			action: '__APP__/Cartoon/uploadFlv', 
			name: 'otherfile',
			onSubmit : function(file, ext){
				button4.text('Uploading');
				this.disable();				
				//Uploding -> Uploading. -> Uploading...
				interval = window.setInterval(function(){
					var text = button.text();
					if (text.length < 13){
						button4.text(text + '.');					
					} else {
						button4.text('Uploading');				
					}
				}, 200);
			},
			onComplete: function(file, response){
				button4.text(response);	
				this.disable();
				//页面操作
				var flv               =    document.getElementById('flv');
				var delflv            =    document.getElementById('delflv');
				flv.value             =    response;
				delflv.style.display  =   'block';				
				//clear 定时器
				window.clearInterval(interval);
				//enable upload button
				this.enable();									
			}
		});		
		
	});
</script>


<div style="height:400px;">
	<table border="1" class="t1" width="100%">
		<tr>
			<th>
				{$lang.cartoon_video}
			</th>
			<td>
				<span>							
					<div id="button4" class="button">Upload</div>	
				</span>
				<span>
					<input id="flv"  type="hidden" name="url" value=""/>
					<span>
						<a id="delflv" href="javascript:fileController.deleteFlv('flv');" class="hide">{$lang.delete}</a>
					</span>
				</span>
			</td>
		</tr>
	</table>
</div>



